<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<!-- 顶部 -->
<div class="layui-header header">
    <div class="layui-main mag0">
        <a href="#" class="logo">智能管理系统</a>
        <!-- 显示/隐藏菜单 -->
        <%--<a href="javascript:;" class="seraph hideMenu icon-caidan"></a>--%>
        <!-- 顶级菜单 -->
        <ul class="layui-nav mobileTopLevelMenus" mobile>
            <li class="layui-nav-item">
                <dl class="layui-nav-child">
                    <c:forEach var="n" items="${sessionScope.moduleList}" varStatus="i">
                        <c:if test="${i.index == 0}">
                            <dd class="layui-this" data-menu="menu${n.id}"><a href="javascript:;" data-url="${n.url}"><i class="layui-icon" data-icon="${n.iconUrl}">${n.iconUrl}</i><cite>${n.name}</cite></a></dd>
                        </c:if>
                        <c:if test="${i.index > 0}">
                            <dd data-menu="menu${n.id}"><a href="javascript:;" data-url="${n.url}"><i class="layui-icon" data-icon="${n.iconUrl}">${n.iconUrl}</i><cite>${n.name}</cite></a></dd>
                        </c:if>
                    </c:forEach>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav topLevelMenus" pc>
            <c:forEach var="n" items="${sessionScope.moduleList}" varStatus="i">
                <c:if test="${i.index == 0}">
                    <li class="layui-nav-item layui-this" data-menu="menu${n.id}">
                        <a href="javascript:;" data-url="${n.url}"><i class="layui-icon" data-icon="${n.iconUrl}">${n.iconUrl}</i><cite>${n.name}</cite></a>
                    </li>
                </c:if>
                <c:if test="${i.index != 0}">
                    <li class="layui-nav-item" data-menu="menu${n.id}">
                        <a href="javascript:;" data-url="${n.url}"><i class="layui-icon" data-icon="${n.iconUrl}">${n.iconUrl}</i><cite>${n.name}</cite></a>
                    </li>
                </c:if>
            </c:forEach>
        </ul>
        <!-- 顶部右侧菜单 -->
        <ul class="layui-nav top_menu">
            <li class="layui-nav-item" id="userInfo">
                <a href="javascript:;"><cite class="adminName">${session_master.name}</cite></a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" data-url="changePwd"><i class="seraph icon-xiugai" data-icon="icon-xiugai"></i><cite>修改密码</cite></a></dd>
                    <dd><a href="logout" class="signOut"><i class="seraph icon-tuichu"></i><cite>退出</cite></a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>